package net.wofly.sale.order.util;

public enum NoMoneyOrderStatus {
	草稿(1001,"草稿"),
    订单提交_未支付(1101, "订单提交/未支付"),
    订单取消(1109, "订单取消"),
    驳回(1104, "驳回"),
    老板审核通过(1901, "老板审核通过"),
    己入帐(2001, "己入帐");
    
    private Integer value;
    private String name;
    
    NoMoneyOrderStatus(Integer value, String name) {
        this.value = value;
        this.name = name;
    }
    
    public static boolean isValueCorrect(Integer value) {
        for (NoMoneyOrderStatus forEnum : values()) {
            if (value == forEnum.getValue().intValue()) {
                return true;
            }
        }
        return false;
    }
    
    public static String getName(Integer value) {
        if (value == null) {
            return null;
        }
        for (NoMoneyOrderStatus forEnum : values()) {
            if (value.equals(forEnum.getValue())) {
                return forEnum.name;
            }
        }
        return null;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public Integer getValue() {
        return value;
    }
    
    public void setValue(Integer value) {
        this.value = value;
    }

}
